<?php
class Default_Model_DbTable_Users extends Zend_Db_Table_Abstract
{
    public $_name = 'users';
    protected $_primary = 'id_user';
    
    public function findCredentials($email, $pwd)
    {
        $select = $this->select()
            ->where('email = ?', $email)
            ->where('password = ?', $this->hashPassword($pwd));
        $row = $this->fetchRow($select);
        if($row) {
            return $row;
        }
        return false;
    }
    protected function hashPassword($pwd)
    {
        //return md5($pwd);
        return $pwd;
    }
}